
<div class="config-container config-env-variables">
<a name="plain_section"><h3 class="section-title">Environment Variables</h3></a>
<span title="Environment variables defined here are set on the agents and can be used within your tasks. <a class='' href='<%= docs_url '/faq/dev_use_current_revision_in_build.html' %>' target='_blank'>More...</a>" class="contextual_help has_go_tip_right">&nbsp;</span>

<%= form_for @pipeline, :as => :pipeline, :url => pipeline_update_path(:pipeline_name => @pipeline.name(), :current_tab => 'environment_variables'), :html => {:method => :put, :id => "pipeline_edit_form"} do |f| %>
    <%= hidden_field_tag :pipeline_digest, @pipeline_digest %>
    <%= hidden_field_tag :pipeline_group_name, @pipeline_group_name %>
    <%= render partial: 'admin/shared/environment_variable_fieldset', locals: {
                                                                            form: f,
                                                                            collection: @pipeline.getPlainTextVariables(),
                                                                            collection_name: :variables,
                                                                            read_only_page: @is_config_repo_pipeline,
                                                                            nested_name: 'pipeline>variables'
                                                                    } %>

    <h3>Secure Variables</h3>
    <span title="Environment variables that are never displayed or logged in plain text. <a class='' href='<%= docs_url '/faq/dev_use_current_revision_in_build.html' %>' target='_blank'>More...</a>" class="contextual_help has_go_tip_right">&nbsp;</span>
    <div class="fieldset">
        <%= render :partial => "admin/shared/name_value", :locals => {:scope => {:form => f, :collection => @pipeline.getSecureVariables(), :collection_name => :variables, :secure => true, :read_only_page => @is_config_repo_pipeline }} %>
        <div class='clear'></div>
    </div>

    <%= render :partial => "admin/shared/form_submit", :locals => {:scope => {:reset_url => pipeline_edit_path(:pipeline_name => params[:pipeline_name], :current_tab => 'environment_variables')}} unless @is_config_repo_pipeline%>
<% end %>
</div>
